<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

use kartik\datetime\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model backend\controllers\LogsSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="logs-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'options'=> ['class'=>'form-inline'],
    ]); ?>



    <?= $form->field($model, 'goodsid')->label('货品编号') ?>

    <?= $form->field($model, 'opid')->dropDownList($oprs) ?>

    <?= $form->field($model, 'oprtype')->dropDownList([''=>'请选择',
        '登录',
        '退出登录',
        '创建商品',
        '更新商品',
        '批量导入_创建商品',
        '批量导入_更新商品',
        '批量导出',
        '审核通过',
        '审核不通过',
        '审核报告',
        '审核通知']) ?>

    <?= $form->field($model, 'remark') ?>

    <?php //echo $form->field($model, 'oprtime') ?>
    <?php
    $uptime =  Html::tag('label', "操作时间", ['class' => 'control-label ']);
    $uptime .=chr(10).chr(13);
    $uptime .= DateTimePicker::widget(['name' => 'LogsSearch[datefrom]','options'=>['class'=>'form-control', 'autocomplete'=>'off'],'pluginOptions'=>['format'=>'yyyy-m-d H:i:s'],'value'=>isset($logssearch['datefrom'])?$logssearch['datefrom']:'','layout'=>'{input}{picker}']);
    $uptime .= Html::label('~');
    $uptime .= DateTimePicker::widget(['name' => 'LogsSearch[dateto]','options'=>['class'=>'form-control', 'autocomplete'=>'off'],'pluginOptions'=>['format'=>'yyyy-m-d H:i:s'],'value'=>isset($logssearch['dateto'])?$logssearch['dateto']:'','layout'=>'{input}{picker}']);
    $uptime .= Html::tag("div",'',['class'=>'help-block']);
    ?>
    <?php echo Html::tag('div', $uptime, ['class'=>'form-group field-goodssearch-goodsno']);?>

    <div class="form-group">
        <?= Html::submitButton('搜索', ['class' => 'btn btn-primary']) ?>
        <?= Html::button('重置', ['class' => 'btn btn-default']) ?>


        <div class="help-block"></div>
    </div>

    <?php ActiveForm::end(); ?>

</div>
<?php
$this->registerJs("
$('.btn-default').click(function(){
 $('input').val('');
    
});

");
?>